]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
build: Run postinstall script where necessary
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 18 Mar 2018 21:07:32 +0000 (22:07 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Mon, 9 Apr 2018 19:19:33 +0000 (19:19 +0000)
Package managers usually take care of compiling GSettings schemas and
updating the .desktop database on installation, but when building
manually from source, we should perform the aforementioned actions
ourselves.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/127

meson.build
meson/meson-postinstall.sh [new file with mode: 0755]

index 4bc70274e670e289db8a3648553c77ea6b1ca618..a420e7963d243ecddd3e1b5e9106622cce4b79db 100644 (file)
@@ -189,3 +189,5 @@ subdir('tests')
 if get_option('gtk_doc')
   subdir('docs/reference')
 endif
+
+meson.add_install_script('meson/meson-postinstall.sh')
diff --git a/meson/meson-postinstall.sh b/meson/meson-postinstall.sh
new file mode 100755 (executable)
index 0000000..4500dcb
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Package managers set this so we don't need to run
+if [ -z "$DESTDIR" ]; then
+  echo Compiling GSettings schemas...
+  glib-compile-schemas ${MESON_INSTALL_PREFIX}/share/glib-2.0/schemas
+
+  echo Updating desktop database...
+  update-desktop-database -q ${MESON_INSTALL_PREFIX}/share/applications
+fi